package com.scanner.regex;

import java.util.Scanner;

public class Demo1 {
	
	public static void main(String[] args) {
		Scanner s=new Scanner("12, 24, 33, 65, 23");
		//使用正则表达式指定分界符
		s.useDelimiter("\\s*,\\s*");
		
		while(s.hasNextInt()){
			System.out.println(s.nextInt());
		}
	}

}
